<?php (!defined('IN_SYSTEM') || !defined('ADMIN_PRE')) && exit('Access Denied!');?>
{admintemplate header}
<div class="box">
	<div class="heading">
	<h1>电子商务</h1>
	<div class="buttons">
	<a href="{url admin.php?m=ecommerce}">基本设置</a>
	<a href="{url admin.php?m=ecommerce&f=payment&type=alipay}">支付宝</a>
	<a href="{url admin.php?m=ecommerce&f=payment&type=tenpay}">财付通</a>
	<a href="{url admin.php?m=ecommerce&f=payment&type=quickpay}">中国银联</a>
	</div>
	</div>
	<div class="main">
		
		{if !isset($_REQUEST['f'])}
		
		<form name="save" method="post" action="?m=ecommerce" >
	<input type="hidden" name="ecmsubmit" value="true" />
	<table width="100%" cellspacing="0" class="tb">
		<tr>
			<td colspan="2"><div id="tip"></div></td>
		</tr>
		<tr>
			<td  width="150"  align="right">订单金额赠送积分比率：</td>
			<td><input type="text" name="ecm[ratio]" value="{$ecm['ratio']}" class="input" size="50" /> <span>例如设置为 10，则 1 元获得 10 个积分。设置为 0表示下单不赠送积分</span></td>
		</tr>
		<tr class="bg2"><td></td><td><input type="submit" class="button" value="保存" /></td></tr>
	</table>
	</form>
		
		{/if}
	
	   {if $_REQUEST['f']=='payment'}
	   		<form name="save" method="post" action="?m=ecommerce&f=payment" >
	   			<input type="hidden" name="ecmsubmit" value="true" />
	   			<table cellspacing="0" width="100%" class="tb">
					<tr>
						<td colspan="2"><div id="tip"></div></td>
					</tr>
	   		{if $type=='alipay'}
	   				<tr><td  align="right">是否启用：</td>
					<td>
					<input type="radio" {if $ecm['enable']}checked=""{/if} value="1" name="ecm[enable]" class="radio"/>启用
					<input type="radio" {if !$ecm['enable']}checked=""{/if} value="0" name="ecm[enable]" class="radio"/>禁用
					</td>
					</tr>
	   				<tr><th>支付宝设置
	   				<input type="hidden" name="type" value="alipay" />
	   				</th>
					<th align="left">{if $ecm['aacount']}&nbsp;&nbsp;&nbsp;&nbsp;<a href="index.php?m=payment&f=test&ptype=alipay" target="_blank">点此测试支付宝是否安装成功</a>{/if}</th></tr>
					
					<tr>
						<td align="right" width="150" >收款支付宝账号：</td>
						<td><input type="text" class="input"  name="ecm[aacount]" size="50" value="{$ecm['aacount']}" /><span>请填写真实有效的支付宝账号</span></td>
					</tr>
					<tr>
						<td align="right">合作者身份 (partnerID)：</td>
						<td><input type="text" class="input"  name="ecm[apartner]" size="50" value="{$ecm['apartner']}" /><span></span></td>
					</tr>
					<tr><td  align="right">交易安全校验码 (key)：</td>
						<td><input type="text" class="input"  name="ecm[acode]" size="50" value="{$ecm['acode']}" /><span></span></td>
					</tr>
					<tr><td  align="right">接口类型：</td>
					<td>
					<input type="radio" {if $ecm['server']=='create_partner_trade_by_buyer'}checked=""{/if} value="create_partner_trade_by_buyer" name="ecm[server]" class="radio"/>担保交易
					<input type="radio" {if $ecm['server']=='create_direct_pay_by_user'}checked=""{/if} value="create_direct_pay_by_user" name="ecm[server]" class="radio"/>即时到账
					<input type="radio" {if $ecm['server']=='trade_create_by_buyer'}checked=""{/if} value="trade_create_by_buyer" name="ecm[server]" class="radio"/>标准双接口
					</td>
					</tr>
				
				
				{/if}
				
				
				{if $type=='tenpay'}
				<tr><td  align="right">是否启用：</td>
					<td>
					<input type="radio" {if $ecm['enable']}checked=""{/if} value="1" name="ecm[enable]" class="radio"/>启用
					<input type="radio" {if !$ecm['enable']}checked=""{/if} value="0" name="ecm[enable]" class="radio"/>禁用
					</td>
					</tr>
				<tr><th>财付通担保交易设置<input type="hidden" name="type" value="tenpay" /></th>
				<th align="left">{if $ecm['tacount']}&nbsp;&nbsp;&nbsp;&nbsp;<a href="index.php?m=payment&f=test&ptype=tenpay" target="_blank">点此测试财付通是否安装成功</a>{/if}</th>
				</tr>
				<tr><td align="right">担保交易收款账号：</td>
				<td><input type="text" class="input"  name="ecm[tacount]" size="50" value="{$ecm['tacount']}" /><span></span></td>
				</tr>
				<tr><td width="150" align="right">担保交易账号密钥：</td>
				<td><input type="text" class="input"  name="ecm[tcode]" size="50" value="{$ecm['tcode']}" /><span></span></td>
				</tr>
				<tr>
				<th>财付通即时交易设置</th><th></th>
				</tr>
				<tr><td width="150" align="right">是否启用即时到账：</td>
				<td><input type="radio" {if $ecm['tdirectpay']==1}checked=""{/if} value="1" name="ecm[tdirectpay]" class="radio"/>是
					<input type="radio" {if $ecm['tdirectpay']==0}checked=""{/if}  value="0" name="ecm[tdirectpay]" class="radio"/>否
				</td>
				</tr>
				<tr><td width="150" align="right">财付通即时到账商户号：</td>
				<td><input type="text" class="input"  name="ecm[tbargaino]" size="50" value="{$ecm['tbargaino']}" /><span></span></td>
				</tr>
				<tr><td width="150" align="right">即时到账密钥：</td>
				<td><input type="text" class="input"  name="ecm[tkey]" size="50" value="{$ecm['tkey']}" /><span></span></td>
				</tr>
				{/if}
				
				{if $type=='quickpay'}
				<tr><td  align="right">是否启用：</td>
					<td>
					<input type="radio" {if $ecm['enable']}checked=""{/if} value="1" name="ecm[enable]" class="radio"/>启用
					<input type="radio" {if !$ecm['enable']}checked=""{/if} value="0" name="ecm[enable]" class="radio"/>禁用
					</td>
					</tr>
				<tr><th>中国银联支付设置<input type="hidden" name="type" value="quickpay" /></th>
				<th align="left">{if $ecm['partner']}&nbsp;&nbsp;&nbsp;&nbsp;<a href="index.php?m=payment&f=test&ptype=quickpay" target="_blank">点此测试中国银联支付是否安装成功</a>{/if}</th>
				</tr>
				<tr><td align="right">商户名：</td>
				<td><input type="text" class="input"  name="ecm[acount]" size="50" value="{$ecm['acount']}" /><span></span></td>
				</tr>
				<tr><td align="right">商户号：</td>
				<td><input type="text" class="input"  name="ecm[partner]" size="50" value="{$ecm['partner']}" /><span></span></td>
				</tr>
				<tr><td width="150" align="right">商户密钥：</td>
				<td><input type="text" class="input"  name="ecm[code]" size="50" value="{$ecm['code']}" /><span></span></td>
				</tr>
				
				{/if}
					<tr class="bg2"><td></td><td><input type="submit" class="button" value="保存" /></td></tr>
				</table>
				
				
				
			</form>	
		{/if}
	
	
	
	
	
		</div>
</div>
{admintemplate footer}